package com.waterfeeds.gproxy.session;

import java.util.concurrent.ConcurrentHashMap;

public class Session<K, V> {
    private ConcurrentHashMap<K, V> commons = new ConcurrentHashMap<K, V>();
    public void add(K k, V v) {
        commons.put(k, v);
    }

    public V get(K k) {
        return commons.get(k);
    }

    public void remove(K k) {
        commons.remove(k);
    }

    public void update(K k, V v) {
        commons.putIfAbsent(k, v);
    }


}
